<?php
require_once("DButil.php");
$videoId=$_REQUEST["videoId"];
$status=$_REQUEST["status"];
if($status==0){//待审核中
    // 审核通过
    $sqlgo="update t_video set status=2 where videoId={$videoId} ";
    $arrgo=update($sqlgo);
}else if($status==2){//审核通过后
    //上架
    $sqlup="update t_video set status=3 where videoId={$videoId}";
    $arrup=update($sqlup);
}else if($status==3){//视频上架后
    //下架
    $sqldown="update t_video set status=4 where videoId={$videoId}";
    $arrdown=update($sqldown);
}else if($status==4){//视频下架后
    //上架
    $sqlup="update t_video set status=3 where videoId={$videoId}";
    $arrup=update($sqlup);
}
$result=[
    "go" =>$arrgo,
    "up" =>$arrup,
    "down" =>$arrdown
];
header("Content-Type:application/json;charset=utf-8");
echo json_encode($result);

?>